import requests
import config

class Goodsapi:
    def __init__(self):
        self.get_categories_url = config.BASE_URL+"/api/v1/category/all"
        self.get_TheProductsUnderTheProductCategory_url = config.BASE_URL+"/api/v1/product/by_category?id={}"
        self.getProductInformation_url = config.BASE_URL +"/api/v1/product/{}"
    def getProductInformation_sort(self):
        return requests.get(url=self.get_categories_url)
    def getTheProductsUnderTheProductCategory(self,sort_id1):
        return requests.get(url=self.get_TheProductsUnderTheProductCategory_url.format(sort_id1))
    def getProductInformation(self,id666):
        return requests.get(url=self.getProductInformation_url.format(id666))